﻿using System;
using UnityEngine;

// Token: 0x02000298 RID: 664
public class AISMGProjectile : SMGProjectile
{
	// Token: 0x06000EC2 RID: 3778 RVA: 0x00070E60 File Offset: 0x0006F060
	protected override void Start()
	{
		base.Start();
		this.audioSource.clip = SoundManager.This.GetNpcSmgProjectileImpactSound();
		this.lifeTime = (float)GlobalPreferences.AIProjectileLifetime.value;
		base.SetupAILayerMask();
		Color color = new Color(GlobalPreferences.AISMGColorR.value, GlobalPreferences.AISMGColorG.value, GlobalPreferences.AISMGColorB.value);
		this.SetColor(color, 1f);
	}

	// Token: 0x06000EC3 RID: 3779 RVA: 0x00070ED0 File Offset: 0x0006F0D0
	public void Initialize(EntityBase shooter, float projectileSpeedMultiplier, float scale)
	{
		Color color = new Color(GlobalPreferences.AIRaygunColorR.value, GlobalPreferences.AIRaygunColorG.value, GlobalPreferences.AIRaygunColorB.value);
		this.Initialize(shooter, projectileSpeedMultiplier, scale, color);
	}

	// Token: 0x06000EC4 RID: 3780 RVA: 0x00070F0C File Offset: 0x0006F10C
	public void Initialize(EntityBase shooter, float projectileSpeedMultiplier, float scale, Color color)
	{
		this.shooter = shooter;
		this.baseSpeed = 20f * projectileSpeedMultiplier * scale;
		base.transform.localScale *= scale;
		this.SetColor(color, 1f);
	}

	// Token: 0x06000EC5 RID: 3781 RVA: 0x00070F48 File Offset: 0x0006F148
	protected override void Impact(GameObject hitObject)
	{
		if (hitObject != null && hitObject.layer != Layers.mapLayer)
		{
			EventManager.SendEvent(new AISMGHitEvent(this.shooter, hitObject.GetComponent<EntityBase>()));
		}
		base.Impact(hitObject);
	}

	// Token: 0x040013C0 RID: 5056
	private EntityBase shooter;
}
